package com.dcy.znoa.common.util.wj;

/**
 * 计算结果的入参对象 用int 简化计算
 * Created by $ pengyu on 2018/5/18.
 */
public class DongCengInput {
    /*
    不带底商公式：
    公式1：420X1Y1+400X2Y2+400X3Y3+270X4Y4+440X5Y5+150X6Y6+1*1*3200 ≤ 171060；——此为计容面积约束 167860
    公式2：420*Y1+400*Y2+400Y3+270Y4 +440Y5+150Y6+3200 ≤9706；——此为基地面积约束
    最低层数 ≤ Xi ≤最高层数，i=1,2,3,4,5,6；——此为层数限制
    Xi ≥ 0，i=1,2,3,4,5,6。——此为理论模型的要求
    ※求出来的值若不为整数，请只保留小数点后2位
    * */

    /*
    带底商公式：
    420X1Y1+400X2Y2+400X3Y3+270X4Y4+440X5Y5+150X6Y6+1*1*3200 ≤ 171060；——此为计容面积约束 167860
    420/2*Y1+0*Y2+400Y3+270Y4 +440Y5+150Y6+3200 ≤9706；——此为基地面积约束
    最低层数 ≤ Xi ≤最高层数，i=1,2,3,4,5,6；——此为层数限制
    Xi ≥ 0，i=1,2,3,4,5,6。——此为理论模型的要求
    ※求出来的值若不为整数，请只保留小数点后2位
    * */

    private int x1y1Acreage;//x1y1对应公式1中的420 ,计算货值时以这4个参数计算
    private int x2y2Acreage;
    private int x3y3Acreage;
    private int x4y4Acreage;

    //
    private int y1BaseArea;//y1BaseArea对应公司2的420，注意：如果是带底商公式，这里就不是420，而是420/2
    private int y2BaseArea;
    private int y3BaseArea;
    private int y4BaseArea;

    private int x1Min;
    private int x1Max;
    private int x2Min;
    private int x2Max;
    private int x3Min;
    private int x3Max;
    private int x4Min;
    private int x4Max;
    //单价
    private int z1;
    private int z2;
    private int z3;
    private int z4;

    private int acreageInput;//计容面积 较大
    private int baseAreaInput;//基地面积 较小

    private int temp;//为了计算货值而加的变量

    //以下3个参数是计算所得
    private int xyMinAcreage;//最小值
    private int yMinBaseArea;//最小值
    private int value;//货值;


    public int getXyMinAcreage(){
        int temp =  ((x1y1Acreage < x2y2Acreage ? x1y1Acreage : x2y2Acreage) < x3y3Acreage)
                ? (x1y1Acreage > x2y2Acreage ? x1y1Acreage : x2y2Acreage) : x3y3Acreage;
        return temp < x4y4Acreage ? temp : x4y4Acreage;
    }

    public int getYMinBaseArea(){
        int temp =  ((y1BaseArea < y2BaseArea ? y1BaseArea : y2BaseArea) < y3BaseArea)
                ? (y1BaseArea > y2BaseArea ? y1BaseArea : y2BaseArea) : y3BaseArea;
        return temp < y4BaseArea ? temp : y4BaseArea;
    }
    //x y 交错是为了方便查看计算
    public int getValue(int x1No,int y1No,int x2No,int y2No,int x3No,int y3No,int x4No,int y4No,int temp){
        int value = x1No * y1No * x1y1Acreage * z1 +  x2No * y2No * x2y2Acreage * z2 +  x3No * y3No * x3y3Acreage * z3 +  x4No * y4No * x4y4Acreage * z4 + temp;
        return value;
    }

    public DongCengInput() {
    }

    public DongCengInput(int x1y1Acreage, int x2y2Acreage, int x3y3Acreage, int x4y4Acreage, int y1BaseArea, int y2BaseArea, int y3BaseArea, int y4BaseArea, int x1Min, int x1Max, int x2Min, int x2Max, int x3Min, int x3Max, int x4Min, int x4Max, int z1, int z2, int z3, int z4, int acreageInput, int baseAreaInput, int temp) {
        this.x1y1Acreage = x1y1Acreage;
        this.x2y2Acreage = x2y2Acreage;
        this.x3y3Acreage = x3y3Acreage;
        this.x4y4Acreage = x4y4Acreage;
        this.y1BaseArea = y1BaseArea;
        this.y2BaseArea = y2BaseArea;
        this.y3BaseArea = y3BaseArea;
        this.y4BaseArea = y4BaseArea;
        this.x1Min = x1Min;
        this.x1Max = x1Max;
        this.x2Min = x2Min;
        this.x2Max = x2Max;
        this.x3Min = x3Min;
        this.x3Max = x3Max;
        this.x4Min = x4Min;
        this.x4Max = x4Max;
        this.z1 = z1;
        this.z2 = z2;
        this.z3 = z3;
        this.z4 = z4;
        this.acreageInput = acreageInput;
        this.baseAreaInput = baseAreaInput;
        this.temp = temp;
    }

    public int getX1y1Acreage() {
        return x1y1Acreage;
    }

    public void setX1y1Acreage(int x1y1Acreage) {
        this.x1y1Acreage = x1y1Acreage;
    }

    public int getX2y2Acreage() {
        return x2y2Acreage;
    }

    public void setX2y2Acreage(int x2y2Acreage) {
        this.x2y2Acreage = x2y2Acreage;
    }

    public int getX3y3Acreage() {
        return x3y3Acreage;
    }

    public void setX3y3Acreage(int x3y3Acreage) {
        this.x3y3Acreage = x3y3Acreage;
    }

    public int getX4y4Acreage() {
        return x4y4Acreage;
    }

    public void setX4y4Acreage(int x4y4Acreage) {
        this.x4y4Acreage = x4y4Acreage;
    }

    public int getY1BaseArea() {
        return y1BaseArea;
    }

    public void setY1BaseArea(int y1BaseArea) {
        this.y1BaseArea = y1BaseArea;
    }

    public int getY2BaseArea() {
        return y2BaseArea;
    }

    public void setY2BaseArea(int y2BaseArea) {
        this.y2BaseArea = y2BaseArea;
    }

    public int getY3BaseArea() {
        return y3BaseArea;
    }

    public void setY3BaseArea(int y3BaseArea) {
        this.y3BaseArea = y3BaseArea;
    }

    public int getY4BaseArea() {
        return y4BaseArea;
    }

    public void setY4BaseArea(int y4BaseArea) {
        this.y4BaseArea = y4BaseArea;
    }

    public int getX1Min() {
        return x1Min;
    }

    public void setX1Min(int x1Min) {
        this.x1Min = x1Min;
    }

    public int getX1Max() {
        return x1Max;
    }

    public void setX1Max(int x1Max) {
        this.x1Max = x1Max;
    }

    public int getX2Min() {
        return x2Min;
    }

    public void setX2Min(int x2Min) {
        this.x2Min = x2Min;
    }

    public int getX2Max() {
        return x2Max;
    }

    public void setX2Max(int x2Max) {
        this.x2Max = x2Max;
    }

    public int getX3Min() {
        return x3Min;
    }

    public void setX3Min(int x3Min) {
        this.x3Min = x3Min;
    }

    public int getX3Max() {
        return x3Max;
    }

    public void setX3Max(int x3Max) {
        this.x3Max = x3Max;
    }

    public int getX4Min() {
        return x4Min;
    }

    public void setX4Min(int x4Min) {
        this.x4Min = x4Min;
    }

    public int getX4Max() {
        return x4Max;
    }

    public void setX4Max(int x4Max) {
        this.x4Max = x4Max;
    }

    public int getZ1() {
        return z1;
    }

    public void setZ1(int z1) {
        this.z1 = z1;
    }

    public int getZ2() {
        return z2;
    }

    public void setZ2(int z2) {
        this.z2 = z2;
    }

    public int getZ3() {
        return z3;
    }

    public void setZ3(int z3) {
        this.z3 = z3;
    }

    public int getZ4() {
        return z4;
    }

    public void setZ4(int z4) {
        this.z4 = z4;
    }

    public int getAcreageInput() {
        return acreageInput;
    }

    public void setAcreageInput(int acreageInput) {
        this.acreageInput = acreageInput;
    }

    public int getBaseAreaInput() {
        return baseAreaInput;
    }

    public void setBaseAreaInput(int baseAreaInput) {
        this.baseAreaInput = baseAreaInput;
    }

    public int getTemp() {
        return temp;
    }

    public void setTemp(int temp) {
        this.temp = temp;
    }

    @Override
    public String toString() {
        return "DongCengInput{" +
                "x1y1Acreage=" + x1y1Acreage +
                ", x2y2Acreage=" + x2y2Acreage +
                ", x3y3Acreage=" + x3y3Acreage +
                ", x4y4Acreage=" + x4y4Acreage +
                ", y1BaseArea=" + y1BaseArea +
                ", y2BaseArea=" + y2BaseArea +
                ", y3BaseArea=" + y3BaseArea +
                ", y4BaseArea=" + y4BaseArea +
                ", x1Min=" + x1Min +
                ", x1Max=" + x1Max +
                ", x2Min=" + x2Min +
                ", x2Max=" + x2Max +
                ", x3Min=" + x3Min +
                ", x3Max=" + x3Max +
                ", x4Min=" + x4Min +
                ", x4Max=" + x4Max +
                ", z1=" + z1 +
                ", z2=" + z2 +
                ", z3=" + z3 +
                ", z4=" + z4 +
                ", acreageInput=" + acreageInput +
                ", baseAreaInput=" + baseAreaInput +
                ", temp=" + temp +
                '}';
    }
}
